<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">
    <f:subview id="menuApp">
        <!-- http://www.petefreitag.com/cheatsheets/jqueryui-icons/ -->
        <h:form id="menuForm">
            <p:menubar style="border: none; background: transparent;" rendered="#{sec:ifAnyGranted('ADMIN,USER')}"
                       id="menuSup">  
                <p:submenu label="#{msg.cadastro}" icon="cadastroIco" id="menu1">  
                    <p:menuitem value="#{msg.usuario}" url="/pages/usuario/page.xhtml" icon="cadastroUserIco" id="menu1_1"/>  
                    <p:menuitem value="#{msg.loja}" url="#" icon="ui-icon-home" id="menu1_2"/>  
                    <p:menuitem value="#{msg.banco}" url="#" icon="ui-icon-bookmark" id="menu1_3"
                                rendered="#{sec:ifAllGranted('ADMIN,USER')}" />  
                </p:submenu>  

                <p:submenu label="#{msg.pessoal}" icon="pessoalIco" id="menu2">
                    <p:menuitem value="#{msg.alterarSenha}" url="/pages/pessoal/password.xhtml"
                                icon="pessoalPassIco" id="menu2_1"/> 
                </p:submenu>

                <p:submenu label="#{msg.ajuda}" icon="ajudaIco" id="menu3">  
                    <p:menuitem value="#{msg.conteudo}" url="#" id="menu3_1"/>  
                    <p:submenu label="#{msg.pesquisar}" icon="ui-icon-search" id="menu3_2">  
                        <p:submenu label="#{msg.texto}" id="menu3_2_1">  
                            <p:menuitem value="#{msg.areaTrabalho}" url="#" id="menu3_2_1_1"/>  
                        </p:submenu>  
                        <p:menuitem value="#{msg.arquivo}" url="#" id="menu3_3"/>  
                    </p:submenu>  
                </p:submenu>  


                <p:menuitem value="#{msg.sair}" action="#{loginController.logout()}" id="menu4"
                            icon="sairIco"/>  
            </p:menubar>  
        </h:form>
    </f:subview>
</ui:composition>